package com.blog.backend.mapper;

import com.blog.backend.model.BlogArticle;
import com.blog.backend.req.ArticleListReq;
import com.blog.backend.resp.ArticleResp;
import com.blog.backend.resp.IndexArticleResp;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface BlogArticleMapper {
    int deleteByPrimaryKey(String articleId);

    int insert(BlogArticle record);

    int insertSelective(BlogArticle record);

    BlogArticle selectByPrimaryKey(String articleId);

    int updateByPrimaryKeySelective(BlogArticle record);

    int updateByPrimaryKeyWithBLOBs(BlogArticle record);

    int updateByPrimaryKey(BlogArticle record);

    List<ArticleResp> selectList(@Param("req") ArticleListReq req);

    ArticleResp selectDetail(@Param("articleId") String articleId, @Param("status") Integer status);

    Integer statisticsTotal();

    Integer selectDraftNums();

    ArticleResp getNextArticle(Date createTime);

    List<ArticleResp> selectRecommendArticle();

    Integer updateBrowseNumById(String articleId);

    void addLikeNum(String articleId);

    void updateStatus(String articleId);

    IndexArticleResp selectNewTechonoly();
}